import { init } from 'src/plugins/init';

init();
const { NODE_ENV } = process.env;
const defaultEnv = {
    NODE_ENV,
    //管理员ids
    'superIds':['1','zlgb','admin'],
    //快捷菜单
    'fastMenu': true,
    //缓存路由
    'keepRoute': true,
    //最大缓存数量
    'maxCache':10,
    //请求参数是否需要加密
    'isCrypto': '1',
    //系统域名+端口+目录
    'path':window.location.origin+window.location.pathname,
    //系统key
    'appkey': 'a33a1726d93a401b812bafff8d5b73c3',
    'hshAppKey':'4F6F7268705645754B4A712F35596B562F334237644E6B677075626B6158686D7342794E6D5569576D714F356E664547594943734250725A5066455632374F68'
};
let env;
if (['dev','development'].includes(NODE_ENV)) {
    env = UtilTools.extend(defaultEnv, {
        'ztUrl': 'https://main.hsh.com.cn/api/',
        'scUrl': 'http://117.40.141.208:81/api/',
        'staticUrl': '/remote/',
        'baseUrl': '/remote/api/web/',
        'socketURL': `ws://${window.location.host}`,
        'isCrypto': '0',
        'debuggerMode': true
    });
} else {
    env = UtilTools.extend(defaultEnv, {
        'ztUrl': 'https://main.hsh.com.cn/api/',
        'scUrl': 'http://117.40.141.208:81/api/',
        'staticUrl': '/server/',
        'baseUrl': '/server/api/web/',
        'socketURL': window.location.protocol === 'https:' ? `wss://${window.location.host}` : `ws://${window.location.host}`,
        'isCrypto': '1',
        'debuggerMode': false
    });
}
export default env;